import homeAPI from "@/api/index.js"
const state={
	selectCategoryData:[],
}
const mutations={
	SET_SELECTCATEGORYDATA(state,selectCategory){
		state.selectCategoryData = selectCategory
	}
}
const actions = {
	async getSelectCategoryData({commit}){
		try{
			const result = await homeAPI.reqSelectCategory();
			commit('SET_SELECTCATEGORYDATA',result.data)
			return 'ok'
		}catch(e){
			return rejects(new Error('failed'))
		}
	}
}
const getters = {}
export default{
	namespaced:true,
	state,
	mutations,
	actions,
	getters
}